package com.fuli.app.dao;

import com.fuli.app.dto.query.ExerciseProblemsQueryDTO;
import com.fuli.app.entity.ExerciseProblems;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface ExerciseProblemsDao {
    Integer getMaxSortIndex(String curriculumId);

    Integer insert(ExerciseProblems po);

    ExerciseProblems get(String id);

    List <ExerciseProblems> getByCurriculumId(String curriculumId);

    Integer delete(@Param("id") String id, @Param("updateId") String updateId);

    Integer batchDelete(@Param("idsList") List<String> ids, @Param("updateId") String updateId);

    Integer update(ExerciseProblems po);

    int countByQueryDTO(ExerciseProblemsQueryDTO queryDTO);

    List<ExerciseProblems> listByQueryDTO(ExerciseProblemsQueryDTO queryDTO);

    List<ExerciseProblems> listAllByCurriculumId(String curriculumId);

    Integer batchUpdateSortIndex(@Param("poList") List<ExerciseProblems> poList,@Param("updateId") String updateId);
}
